package com.course.gateway.config;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.env.Environment;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * @PROJECT_NAME: course
 * @DESCRIPTION: 网关全局过滤器/路由过滤器条件装配
 * @Author: 涂玄武
 * @DATE: 2021/6/24 10:13
 */
//public class GatewayFilterConfig implements Condition {
//    @Override
//    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
//        Environment env = conditionContext.getEnvironment();
//        return !env.getProperty("gateway.filter.enable",Boolean.class);
//    }
//}
